﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.IO;
using Portal.Systems.Model;
using Portal.Core;
using System.Collections.ObjectModel;

namespace Portal.Systems.Bussiness.Template
{
    public class SystemsBussinessProcessTemplate : ISystemsBussinessProcess
    {
        public virtual string ServiceId
        {
            get
            {
                return null;
            }
        }
        public virtual AccountTypeCls[] ReadingAccountType(string SiteId, string ParentAccountType) { return null; }
        public virtual AccountTypeCls CreateAccountTypeModel(string SiteId, string AccountType) { return null; }
        public virtual void AddAccountType(
           string SiteId,
           string AccountType,
           string Description,
           string ParentAccountType) { }

        public virtual void SaveAccountType(string SiteId, string AccountType, string Description) { }
        public virtual void DeleteAccountType(string SiteId, string AccountType) { }

        public virtual void MoveRoleToAccountType(string SiteId, string[] AccountTypes, string RoleId) { }

        //**************************************************************************************
        public virtual SystemLogCls[] ReadingSystemLog(
            string SiteId,
            string FromDate,
            string ToDate) { return null; }

        public virtual UserNotLoginCls[] ReadingUserNotLogin(
            string SiteId,
            int Month) { return null; }

        public virtual void AddSysLogProcess(
             string SiteId,
             string UniCode,
             string Action,
             string ActionText,
             string UserId,
             string LoginName,
             string FullName) { }

        public virtual void Delete(
            string SiteId,
            string[] Ids) { }

        //**********************************************************
        public virtual void InitPermisison(string SiteId, IPermission OPermissionTemplate) { }

        public virtual PermissionRoleCls[] ReadingPermissionRoles(
            string SiteId,
            string PermissionTypeId,
            string ObjectId) { return null; }

        public virtual void DeleteNotExistsInObject(string SiteId, string PermissionTypeId) { }

        public virtual string[] ReadingPermissionFunction(
            string SiteId,
            string PermissionTypeId) { return null; }

        public virtual PermissionRoleDetailCls[] ReadingPermissionRoleDetail(
            string SiteId,
            string PermissionTypeId,
            string PermissionRoleId)
        {
            return null;
        }

        public virtual void InitPermissionRoleDetail(
            IDbTransaction Trans,
            string SiteId,
            string PermissionTypeId,
            string PermissionRoleId) { }

        public virtual RoleCls[] ReadingRoleForPermission(
            string SiteId,
            string PermissionTypeId,
            string ObjectId,
            string AccountType,
            string Keyword) { return null; }

        public virtual UserCls[] ReadingUserForPermission(
            string SiteId,
            string PermissionTypeId,
            string ObjectId,
            string AccountType,
            string Keyword) { return null; }

        public virtual void AddRolePermission(
            string SiteId,
            string ptc,
            string ObjectId,
            string[] RoleIds,
            string[] UserIds) { }

        public virtual PermissionRoleCls CreatePermissionRoleModel(
           string SiteId,
           string PermissionRoleId) { return null; }

        public virtual void SetPermissionDetail(
            string SiteId,
            string PermissionRoleId,
            string[] PermissionDetailIds) { }

        public virtual void DeletePermissionRole(
            string SiteId,
            string PermissionRoleId) { }

        public virtual bool CheckPermission(
            string SiteId,
            string ptc,
            string PermissionFunctionId,
            string ObjectId,
            string UserId,
            bool ThrowException) { return false; }



        
        //*********************************************
        public virtual RoleCls[] ReadingRoles(string SiteId, string RoleId, string Keyword) { return null; }
        public virtual RoleCls CreateRoleModel(string SiteId, string RoleId) { return null; }
        public virtual string AddRole(
            IDbTransaction Trans,
            string SiteId,
            string UniCode,
            string RoleId,
            string RoleCode,
            string RoleName,
            string RoleType) { return null; }
        public virtual void SaveRole(IDbTransaction Trans, string SiteId, string RoleId, string LoginName, string FullName) { }
        public virtual void DeleteRole(IDbTransaction Trans, string SiteId, string RoleId) { }
        public virtual RoleCls[] ReadingRolesForUser(string SiteId, string UserId) { return null; }

        //******************************************************************************************
        public virtual UserCls[] ReadingUsers(string SiteId, string UserType, string Keyword) { return null; }
        public virtual UserCls[] ReadingAvailableUser(string SiteId, string RoleId, string Keyword) { return null; }
        public virtual UserCls[] ReadingUserBelongRole(string SiteId, string RoleId, string Keyword) { return null; }
        public virtual Collection<UserCls> ReadingUserBelongRoleForWorkflow(string SiteId, string[] RoleIds) { return null; }
        public virtual UserCls CreateUserModel(string SiteId, string UserId) { return null; }
        public virtual UserCls CheckHasUser(string SiteId, string AssetCode, string LoginName) { return null; }
        public virtual void AddUser(
            IDbTransaction Trans,
            string SiteId,
            string UniCode,
            string UserId,
            string LoginName,
            string FullName,
            string Email,
            string Password,
            string ReTypePassword,
            string[] RoleIds,
            bool   CheckValid) { }

        public virtual void AddUserToRole(
            IDbTransaction Trans,
            string SiteId,
            string RoleId,
            string UserId) { }

        public virtual void RemoveUserFromRole(
            IDbTransaction Trans,
            string SiteId,
            string RoleId,
            string UserId) { }

        public virtual void SaveUser(IDbTransaction Trans, string SiteId, string StudentId, string LoginName, string FullName, string RoleId) { }
        
        public virtual void DeleteUser(IDbTransaction Trans, string SiteId, string UserId) { }
        public virtual void BlockUser(IDbTransaction Trans, string SiteId, string UserId,int LockVal) { }
        public virtual void ChangePassword(string SiteId, string AssetCode, string LoginName, string Password, string RePassword) { }
        public virtual UserCls CheckForLogin(string SiteId, string AssetCode, string LoginName, string Password, ref int LoginAttempCount, ref string gLoginName)
        {
            return null;
        }
        
        public virtual AssetCls[] ReadingAssets(string SiteId) { return null; }
        public virtual AssetCls CreateAssetModel(string SiteId, string AssetCode) { return null; }
        


        public virtual UserQuickLinkCls CreateUserQuickLinkModel(string SiteId, string UserQuickLinkId)
        {
            return null;
        }
        public virtual void AddUserQuickLink(string SiteId, UserQuickLinkCls OUserQuickLink) { }
        public virtual void DeleteUserQuickLink(string SiteId, string UserQuickLinkId) { }
        public virtual UserQuickLinkCls[] ReadingUserQuickLinks(string SiteId, string UserId) { return null; }



        public virtual BackSessionCls CreateBackSessionModel(string SiteId, string BackSessionId)
        {
            return null;
        }
        public virtual void AddBackSession(string SiteId, BackSessionCls OBackSession) { }
        public virtual void DeleteBackSession(string SiteId, string BackSessionId) { }
        public virtual BackSessionCls[] ReadingBackSessions(string SiteId, string Id) { return null; }


        public virtual RoleMenuCls CreateRoleMenuModel(string SiteId, string RoleMenuId){return null;}
        public virtual void SaveRoleMenu(string SiteId,string AssetCode,string RoleId, RoleMenuCls[] ORoleMenu) { }
        public virtual void DeleteRoleMenu(string SiteId, string RoleMenuId) { }
        public virtual RoleMenuCls[] ReadingRoleMenus(string SiteId, string RoleId) { return null; }
        public virtual void SyncRoleAndUsers(string SiteId, RoleCls[] Roles) { }

        //webpage
        public virtual PageCls CreatePageModel(string SiteId, string PageId) { return null; }
        public virtual PageCls[] ReadingPage(string SiteId, string Keyword) { return null; }
        public virtual void AddPage(string SiteId, PageCls OPage) { }
        public virtual void SavePage(string SiteId, string PageId, PageCls OPage) { }
        public virtual void DeletePage(string SiteId, string PageId) { }
        public virtual void PublishingPage(string SiteId, string PageId) { }
        public virtual void UnPublishingPage(string SiteId, string PageId) { }
        public virtual void DeployPage(string SiteId, string PageId) { }
        public virtual void UnDeployPage(string SiteId, string PageId) { }
        public virtual void SavePageZoneModuleView(string SiteId, string PageZoneModuleId, string PlugInViewId) { }
        public virtual void SavePageZoneForMove(string SiteId, string PageZoneModuleId, string PageZoneId) { }
        public virtual void SavePageZoneModuleInfo(string SiteId, PageZoneModuleCls[] PageZoneModules) { }

        //webpage-zone
        public virtual PageZoneCls CreatePageZoneModel(string SiteId, string PageZoneId) { return null; }
        public virtual PageZoneCls[] ReadingPageZone(string SiteId, string PageId, string Keyword) { return null; }
        public virtual void AddPageZone(string SiteId, PageZoneCls OPageZone) { }
        public virtual void SavePageZone(string SiteId, string PageZoneId, PageZoneCls OPageZone) { }
        public virtual void DeletePageZone(string SiteId, string PageZoneId) { }
        public virtual void PublishingPageZone(string SiteId, string PageZoneId) { }
        public virtual void UnPublishingPageZone(string SiteId, string PageZoneId) { }

        //webpage-zone-module
        public virtual PageZoneModuleCls CreatePageZoneModuleModel(string SiteId, string PageZoneModuleId) { return null; }
        public virtual PageZoneModuleCls[] ReadingPageZoneModule(string SiteId, string PageZoneId) { return null; }
        public virtual PageZoneModuleCls[] ReadingModulesInPage(string SiteId, string PageId) { return null; }
        public virtual void AddPageZoneModule(string SiteId, PageZoneModuleCls OPageZoneModule) { }
        public virtual void SavePageZoneModule(string SiteId, string PageZoneModuleId, PageZoneModuleCls OPageZoneModule) { }
        public virtual void DeletePageZoneModule(string SiteId, string PageZoneModuleId) { }
        public virtual void PublishingPageZoneModule(string SiteId, string PageZoneModuleId) { }
        public virtual void UnPublishingPageZoneModule(string SiteId, string PageZoneModuleId) { }

        //workflow def
        public virtual WorkflowDefCls CreateWorkflowDefModel(string SiteId, string WorkflowDefId) { return null; }
        public virtual WorkflowDefCls[] ReadingWorkflowDef(string SiteId) { return null; }
        public virtual WorkflowControlCls CreateWorkflowControlModel(string SiteId, string WorkflowControlId) { return null; }

        public virtual WorkflowDefMapRoleCls[] ReadingWorkflowDefMapRoles(string SiteId, string WorkflowDefId, RoleCls[] WorkflowRoles) { return null; }
        public virtual void SaveWorkflowDefMapRoles(string SiteId, string WorkflowDefId, WorkflowDefMapRoleCls[] WorkflowDefMapRoles) { }

        public virtual WorkflowControlCls[] ReadingWorkflowControls(string SiteId) { return null; }
        public virtual void SaveWorkflowControls(string SiteId, WorkflowControlCls[] WorkflowControls) { }
        public virtual WorkflowDefCls CreateWorkflowDefFromWorkflowControl(string SiteId, string WorkflowControlId) { return null; }
        public virtual DataLanguageCls[] ReadingDataLanguage(string SiteId) { return null; }
        public virtual DataLanguageCls CreateDataLanguageModel(string SiteId, string DataLanguageId) { return null; }
        public virtual void SaveRoleExtraConfig(
            string SiteId,
            string RoleId,
            string DataLanguageId,
            RoleExtraConfigCls ORoleExtraConfig) { }

        public virtual RoleExtraConfigCls CreateRoleExtraConfigModel(string SiteId, string RoleExtraConfigId) { return null; }
        public virtual RoleExtraConfigCls CreateRoleExtraConfigModel(string SiteId, string AssetCode, string RoleId, string DataLanguageId) { return null; }

        public virtual RoleWorkingWorkflowCls[] ReadingRoleWorkingWorkflow(string SiteId, string RoleId) { return null; }
        public virtual RoleWorkingWorkflowCls[] ReadingAllowAccessRoleWorkingWorkflow(string SiteId, string RoleId) { return null; }
        public virtual RoleWorkingWorkflowCls[] ReadingAllowAccessRoleWorkingWorkflow(string SiteId, string RoleId, string WorkflowControlType) { return null; }

        public virtual void SaveRoleWorkingWorkflow(string SiteId, string RoleId, RoleWorkingWorkflowCls[] RoleWorkingWorkflow) { }
        public virtual RoleWorkingWorkflowCls CreateRoleWorkingWorkflowModel(string SiteId, string RoleWorkingWorkflowId) { return null; }
        public virtual bool CheckAllowAccessWorkflow(string SiteId, string RoleId, string WorkflowDefId) { return false; }



        public virtual GroupRoleCls[] ReadingGroupRoles(string SiteId, string Keyword) { return null; }
        public virtual GroupRoleCls CreateGroupRoleModel(string SiteId, string GroupRoleId) { return null; }
        public virtual string AddGroupRole(
            IDbTransaction Trans,
            string SiteId,
            string AssetCode,
            string GroupRoleId,
            string GroupRoleName,
            int SortIndex) { return null; }
        public virtual void SaveGroupRole(IDbTransaction Trans, string SiteId, string GroupRoleId, string GroupRoleName, int SortIndex) { }
        public virtual void DeleteGroupRole(IDbTransaction Trans, string SiteId, string GroupRoleId) { }
        public virtual RoleCls[] ReadingRoleForGroupRole(string SiteId, string GroupRoleId) { return null; }
        public virtual RoleCls[] ReadingRoleAvailableForGroupRole(string SiteId, string GroupRoleId, string Keyword) { return null; }
        public virtual RoleCls[] ReadingRoleBelongGroupRole(string SiteId, string GroupRoleId, string Keyword) { return null; }
        public virtual void AddRoleToGroupRole(IDbTransaction Trans, string SiteId, string GroupRoleId, string RoleId) { }
        public virtual void RemoveRoleFromGroupRole(IDbTransaction Trans, string SiteId, string RoleInGroupRoleId) { }
        public virtual void RemoveRoleFromGroupRole(IDbTransaction Trans, string SiteId, string GroupRoleId, string RoleId) { }
        public virtual Collection<UserCls> ReadingUsersInGroupRoles(string SiteId, string[] GroupRoleIds) { return null; }
        public virtual string[] ConvertSystemGroupRoleFromWorkflowGroupRole(string SiteId, string WorkflowDefId, string[] GroupRoleIds) { return null; }

        //role relation Template
        public virtual RoleRelationTemplateCls[] ReadingRoleRelationTemplate(string SiteId, string Keyword) { return null; }
        public virtual RoleRelationTemplateCls CreateRoleRelationTemplateModel(string SiteId, string RoleRelationTemplate) { return null; }
        public virtual void AddRoleRelationTemplate(
            IDbTransaction Trans,
            string SiteId,
            string AssetCode,
            string RoleRelationTemplateName,
            int SortIndex,
            string XmlData) { }

        public virtual void SaveRoleRelationTemplate(
            IDbTransaction Trans,
            string SiteId,
            string RoleRelationTemplateId,
            string RoleRelationTemplateName,
            string XmlData) { }
        public virtual void DeleteRoleRelationTemplate(IDbTransaction Trans, string SiteId, string RoleRelationTemplateId) { }


        public virtual void SavePageZoneModuleConfig(string SiteId, string PageZoneModuleId, string XmlDataConfig) { }
        public virtual void SaveArchiveTempFile(
            IDbTransaction Trans, 
            string SiteId, 
            string ArchiveTempFileId,
            string SaveFile, 
            string SaveTitle)
        {
        }

        public virtual void DeleteArchiveTempFile(
            IDbTransaction Trans,
            string SiteId,
            string ArchiveTempFileId){}

        public virtual AccountTypeCls[] ReadingAccountTypeForRole(string SiteId, string RoleId) { return null; }

        public virtual string DuplicatePage(string SiteId, string PageId) { return null; }

        public virtual RoleCls[] ReadingRolesForDatabaseFolderPermission(
            string SiteId,
            string DatabaseFolderId,
            string Keyword) { return null; }

        public virtual UserCls[] ReadingUserForDatabaseFolderPermission(
            string SiteId,
            string DatabaseFolderId,
            string Keyword) { return null; }


        public virtual RoleCls[] ReadingRolesForDatabaseFieldPermission(
            string SiteId,
            string DatabaseFieldId,
            string Keyword) { return null; }

        public virtual UserCls[] ReadingUserForDatabaseFieldPermission(
            string SiteId,
            string DatabaseFieldId,
            string Keyword) { return null; }
    }
}

